<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Web-components</title>
</head>
<style>
    .container {
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        padding: 50px;
    }
</style>
<body>
<div class="container">
    <custom-stepper count="20" step="10" id="customStepper">
        <span slot="minusBtnText">-</span>
        <span slot="plusBtnText">+</span>
    </custom-stepper>
    <!--    <iframe src="https://cn.bing.com/?form=REDIRERR" frameborder="0" width="0"></iframe>-->
</div>
<script type="module" src="custom-stepper.js"></script>
<script>
    //mode对外部容器的影响
    window.onload = function () {
        console.log("shadowRoot", document.getElementById("customStepper").shadowRoot);
        document.getElementById("customStepper").onError = function (err) {
            console.warn("捕获到的内部错误：" + err)
        }
    }
</script>
</body>
</html>